package com.ruoyi.business.rule.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.business.base.JoBaseEntity;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import java.util.List;

/**
 * 物流规则对象 jb_logistics_rules
 *
 * @author ruoyi
 * @date 2024-10-11
 */
@TableName(autoResultMap = true)
@Data
public class JbLogisticsRules extends JoBaseEntity
{
    private static final long serialVersionUID = 1L;

    /**
     * 公司名称
     */
    @Excel(name = "公司名称")
    private String logisticsCompany;

    /**
     * 物流方式
     */
    @Excel(name = "物流方式")
    private String logisticsMethod;

    /**
     * 联系人
     */
    @Excel(name = "联系人")
    private String contactPerson;

    /**
     * 手机号
     */
    @Excel(name = "手机号")
    private String phoneNumber;

    /**
     * 计费方式
     */
    @Excel(name = "计费方式")
    private String billingMethod;

    /**
     * 计费规则
     */
    @Excel(name = "计费规则")
    @TableField(typeHandler = JacksonTypeHandler.class)
    @NotEmpty(message = "计费规则不能为空")
    private List<JbLogisticsRulesJson> billingRule;

    /**
     * 状态（0正常 1停用）
     */
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    private boolean status;
}
